FROM centos7-jdk17
EXPOSE 8080
ADD target/ruoyi-admin.jar /ruoyi-admin.jar

WORKDIR /

ENV JVM_OPTS="-Dname=RuoYi -Duser.timezone=Asia/Shanghai -Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError -XX:+PrintGCDetails -XX:NewRatio=1 -XX:SurvivorRatio=30 -XX:+UseParallelGC"

ENTRYPOINT ["sh", "-c", "java $JVM_OPTS -jar /ruoyi-admin.jar"]
